<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>



    <style type="text/css">
        .box{
            display: flex;
            display: -webkit-flex;
            justify-content: center; /* 水平居中 */
            align-items: center;     /* 垂直居中 */
            /*水平方向，左端对齐*/
            /*flex-direction: row;*/
            /*水平方向，右端对齐*/
            /*flex-direction: row-reverse;*/
            /*垂直方向，顶部对齐*/
            flex-direction: column;
            /*垂直方向，底部对齐*/
            /*flex-direction: column-reverse;*/
            /*background: #999;*/
            width: 100%;
            height: 100%;
        }
        .box span{
            display: inline-block;
            margin: 10px 10px;
            padding: 8px;
            width: 60%;
            height: 50px;
            font-size: 28px;
            /*font-weight: bold;*/
            text-align: center;
            line-height: 50px;
            border: 2px solid #51A938;
            color: #51A938;
        }
    </style>
    <div class="box">
        <span onclick="backHome()" >返回商家</span>
    </div>
    <script type="text/javascript">
        function backHome(){
            window.location.href="<?php echo $referer;?>"
        }
        function onBridgeReady(){
            WeixinJSBridge.invoke(
                'getBrandWCPayRequest',
                <?php echo $jsApiParameters; ?>,
                function(res){
                    if(res.err_msg == "get_brand_wcpay_request:ok" ){
                        alert(12)
                        // 使用以上方式判断前端返回,微信团队郑重提示：
                        //res.err_msg将在用户支付成功后返回ok，但并不保证它绝对可靠。
                    }
                });
        }
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
                document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
            }
        }else{
            onBridgeReady();
        }
    </script>
    <script type="text/javascript">
        //获取共享地址
        function editAddress()
        {

        }

        window.onload = function(){
            if (typeof WeixinJSBridge == "undefined"){
                if( document.addEventListener ){
                    document.addEventListener('WeixinJSBridgeReady', editAddress, false);
                }else if (document.attachEvent){
                    document.attachEvent('WeixinJSBridgeReady', editAddress);
                    document.attachEvent('onWeixinJSBridgeReady', editAddress);
                }
            }else{
                editAddress();
            }
        };

    </script>
</head>
</html>
